Conversation
b6a189f to
d9908eb
Compare
|
I have being using it and it works like a charm. Maybe just a good idea to be clearer on the instruction about setting remote control. I mean, I was just setting as |
The strategy adds support for :Make/:Dispatch and :Start/:Spawn task execution using Kitty windows and tabs. :Make/:Dispatch tasks use kitty's get-text[^1] feature to avoid piping command outputs. This allows interactive debugging sessions and complex TUIs to function. It also allows outputs to display in color during execution and capture the output without ANSI codes. Environment isolation is implemented using the `--copy-env` and `--env` flags. Environment variables are copied over except the ones set by (neo)vim itself. [^1]: https://sw.kovidgoyal.net/kitty/remote-control/#kitten-get-text
d9908eb to
7e58255
Compare
@kelvinst, thank you for the tip. I added an example kitty config with some explanation and a reference to the neovim issue tracker. |
7e58255 to
53defe1
Compare
|
|
||
| let cmd = s:kitty_launch_cmd(type, a:request, dispatch#prepare_start(a:request, cmd_with_capturing, 'make')) | ||
| let output = system(cmd) | ||
| let window_id = matchstr(output, '^\d\+$') |
There was a problem hiding this comment.
@trekdemo, for some reason, this was not matching anymore after I updated kitty, maybe a trailing \n, IDK. Anyway, I think it's safe to just search for the first sequence of digits, no?
| let window_id = matchstr(output, '^\d\+$') | |
| let window_id = matchstr(output, '\d\+') |
There was a problem hiding this comment.
This was causing dispatch to spawn duplicated jobs, because the kitty one was started, but it failed to get the window_id, so this returns exit code 1 and dispatch would then fallback to the other handlers (jobstart, terminal, etc). The symptom for me was that a quickfix was shown besides at the same time of the kitty window, which didn't bother me in the beginning, until I started getting some problem because of the concurrent processes trying to write to the same SQLite database.
The strategy adds support for
:Make/:Dispatchand:Start/:Spawntask execution using the Kitty terminal emulator's windows and tabs.:Make/:Dispatchtasks use kitty's get-text1 feature to avoid piping command outputs. This allows interactive debugging sessions and complex TUIs to function. It also allows outputs to display in color during execution and capture the output without ANSI codes.Environment isolation is implemented using the
--copy-envand--envflags. Environment variables are copied over, except the ones set by (neo)vim itself.vim-dispatch-kitty.mp4
👋 Hey Mr. Pope,
A huge fan here. I've used this plugin for the last decade. I'm grateful for your work and glad that this plugin helped me have fun and earn a living.
I used this plugin with the tmux strategy since the beginning. Lately, I grew apart from tmux and started using the multiplexing capabilities of the Kitty terminal emulator.
I've been testing this patch for the last month and have fixed all the issues I encountered. It's my first major Vimscript project, so I'm unsure if everything meets the standards.
Please let me know if this strategy is something you would like to add to this esteemed plugin.
Footnotes
https://sw.kovidgoyal.net/kitty/remote-control/#kitten-get-text ↩